Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support boot CPU not being 0. #368

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

dberlin
Copy link
Contributor

@dberlin dberlin commented Dec 1, 2023

Right now, we assume the boot cpu is cpu0. That is not true on m3 max,
where it is cpu4.

To figure out which CPU is the boot CPU, we check to see which CPU
is running before we start any other CPUs, and record the MPIDR/idx.

Without this patch, four issues happen on m3 max:

  1. We try to start the boot CPU again when we enable SMP, crashing it
  2. We skip starting the real CPU 0
  3. We start m1n1 again on CPU0 when we do boot it
  4. We enable interrupts on CPU0 because we think it's the primary CPU.

Signed-off-by: Daniel Berlin [email protected]

@dberlin dberlin force-pushed the m3-work-boot-not-zero branch 5 times, most recently from 7d20b94 to 708ba9e Compare December 1, 2023 16:34
Right now, we assume the boot cpu is cpu0.  That is not true on m3 max,
where it is CPU 4.

To figure out which CPU is the boot CPU, we check to see which CPU
is running before we start any other CPUs, and record the MPIDR/idx.

Without this patch, four issues happen on m3 max:

1. We try to start the boot CPU again, crashing it
2. We skip the real CPU 0
3. We start m1n1 again on CPU0 when we boot it
4. We enable interrupts on CPU0 because we think it's the primary CPU.

Signed-off-by: Daniel Berlin <[email protected]>
@dberlin dberlin force-pushed the m3-work-boot-not-zero branch from 708ba9e to 69b2d36 Compare December 2, 2023 16:57
@marcan
Copy link
Member

marcan commented Dec 3, 2023

This is probably going to break a pile of scripts on the python side too, but we'll deal with that later :)

@marcan marcan merged commit 9f846b1 into AsahiLinux:main Dec 3, 2023
3 checks passed
@dberlin
Copy link
Contributor Author

dberlin commented Dec 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants